knitr::opts_chunk$set(echo = FALSE, message = FALSE)
library(Seurat)
library(ggplot2)
library(data.table)
library(MAST)
library(SingleR)
library(dplyr)
library(tidyr)
library(limma)
library(scRNAseq)## R version 4.0.2 (2020-06-22)
## Platform: x86_64-apple-darwin17.0 (64-bit)
## Running under: macOS Catalina 10.15.4
##
## Matrix products: default
## BLAS: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRblas.dylib
## LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib
##
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
##
## attached base packages:
## [1] parallel stats4 stats graphics grDevices utils datasets
## [8] methods base
##
## other attached packages:
## [1] scRNAseq_2.2.0 limma_3.44.3
## [3] tidyr_1.1.1 dplyr_1.0.2
## [5] SingleR_1.2.4 MAST_1.14.0
## [7] SingleCellExperiment_1.10.1 SummarizedExperiment_1.18.2
## [9] DelayedArray_0.14.1 matrixStats_0.56.0
## [11] Biobase_2.48.0 GenomicRanges_1.40.0
## [13] GenomeInfoDb_1.24.2 IRanges_2.22.2
## [15] S4Vectors_0.26.1 BiocGenerics_0.34.0
## [17] data.table_1.13.0 ggplot2_3.3.2
## [19] Seurat_3.2.0
##
## loaded via a namespace (and not attached):
## [1] AnnotationHub_2.20.1 BiocFileCache_1.12.1
## [3] plyr_1.8.6 igraph_1.2.5
## [5] lazyeval_0.2.2 splines_4.0.2
## [7] BiocParallel_1.22.0 listenv_0.8.0
## [9] digest_0.6.25 htmltools_0.5.0
## [11] magrittr_1.5 memoise_1.1.0
## [13] tensor_1.5 cluster_2.1.0
## [15] ROCR_1.0-11 globals_0.12.5
## [17] colorspace_1.4-1 blob_1.2.1
## [19] rappdirs_0.3.1 ggrepel_0.8.2
## [21] xfun_0.16 crayon_1.3.4
## [23] RCurl_1.98-1.2 jsonlite_1.7.0
## [25] spatstat_1.64-1 spatstat.data_1.4-3
## [27] survival_3.2-3 zoo_1.8-8
## [29] ape_5.4-1 glue_1.4.1
## [31] polyclip_1.10-0 gtable_0.3.0
## [33] zlibbioc_1.34.0 XVector_0.28.0
## [35] leiden_0.3.3 BiocSingular_1.4.0
## [37] future.apply_1.6.0 abind_1.4-5
## [39] scales_1.1.1 DBI_1.1.0
## [41] miniUI_0.1.1.1 Rcpp_1.0.5
## [43] viridisLite_0.3.0 xtable_1.8-4
## [45] reticulate_1.16 bit_4.0.4
## [47] rsvd_1.0.3 htmlwidgets_1.5.1
## [49] httr_1.4.2 RColorBrewer_1.1-2
## [51] ellipsis_0.3.1 ica_1.0-2
## [53] pkgconfig_2.0.3 uwot_0.1.8
## [55] dbplyr_1.4.4 deldir_0.1-28
## [57] tidyselect_1.1.0 rlang_0.4.7
## [59] reshape2_1.4.4 later_1.1.0.1
## [61] AnnotationDbi_1.50.3 munsell_0.5.0
## [63] BiocVersion_3.11.1 tools_4.0.2
## [65] generics_0.0.2 RSQLite_2.2.0
## [67] ExperimentHub_1.14.1 ggridges_0.5.2
## [69] evaluate_0.14 stringr_1.4.0
## [71] fastmap_1.0.1 yaml_2.2.1
## [73] goftest_1.2-2 knitr_1.29
## [75] bit64_4.0.2 fitdistrplus_1.1-1
## [77] purrr_0.3.4 RANN_2.6.1
## [79] pbapply_1.4-3 future_1.18.0
## [81] nlme_3.1-148 mime_0.9
## [83] compiler_4.0.2 plotly_4.9.2.1
## [85] curl_4.3 png_0.1-7
## [87] interactiveDisplayBase_1.26.3 spatstat.utils_1.17-0
## [89] tibble_3.0.3 stringi_1.4.6
## [91] lattice_0.20-41 Matrix_1.2-18
## [93] vctrs_0.3.2 pillar_1.4.6
## [95] lifecycle_0.2.0 BiocManager_1.30.10
## [97] lmtest_0.9-37 RcppAnnoy_0.0.16
## [99] BiocNeighbors_1.6.0 cowplot_1.0.0
## [101] bitops_1.0-6 irlba_2.3.3
## [103] httpuv_1.5.4 patchwork_1.0.1
## [105] R6_2.4.1 promises_1.1.1
## [107] KernSmooth_2.23-17 gridExtra_2.3
## [109] codetools_0.2-16 MASS_7.3-52
## [111] assertthat_0.2.1 withr_2.2.0
## [113] sctransform_0.2.1 GenomeInfoDbData_1.2.3
## [115] mgcv_1.8-31 grid_4.0.2
## [117] rpart_4.1-15 rmarkdown_2.3
## [119] DelayedMatrixStats_1.10.1 Rtsne_0.15
## [121] shiny_1.5.0
## Warning: Using `as.character()` on a quosure is deprecated as of rlang 0.3.0.
## Please use `as_label()` or `as_name()` instead.
## This warning is displayed once per session.
In v2 of the analysis we decided to include the control mice from the Nbeal experiment with the Migr1 and Mpl mice. The thought is that it may be good to have another control, since the Migr1 control has irradiated and had a bone marrow transplantation. I’m going to split the Rmarkdown files into separate part, to better organize my analysis.
I’m going to go with the consensus names from the labeling stage and produce figures covering the distribution of cell types within clusters, conditions (enriched/not enriched), experiments (Mpl, Migr, Nbeal_cnt), states(condition + experiment), etc.
## Cluster SingleR.comb SingleR.ref1 SingleR.ref2 SingleR_cell_comb
## 1 0 Neutrophils Neutrophils Granulocytes Neutrophil
## 2 1 Granulocytes Neutrophils Granulocytes Granulocytes
## 3 2 Stem cells Stem Cells Granulocytes Stem Cells
## 4 3 B cells B cells B cells B cell
## 5 4 Neutrophils Neutrophils Granulocytes Neutrophil
## 6 5 Monocytes Monocytes Monocytes Monocyte
## 7 6 Basophils Basophils Granulocytes Basophil
## 8 7 Stem cells Stem Cells Monocytes Stem cells
## 9 8 Macrophages Macrophages Macrophages Macrophages
## 10 9 B cells B cells B cells B cells
## 11 10 Erythrocytes B cells Erythrocytes Erythrocytes
## 12 11 T cells T cells T cells T cells
## 13 12 Stem cells Stem Cells Erythrocytes Stem Cells
## 14 13 B cells B cells B cells B cells
## 15 14 <NA> B cells B cells <NA>
## markers hum_ref final final2
## 1 Granulocyte Granulocyte Granulocyte
## 2 <NA> Granulocyte Granulocyte
## 3 Granulocyte Erythrocytes Stem Cells ?GMP
## 4 B-cells B cells B cell B cell
## 5 <NA> Granulocyte Granulocyte
## 6 Monocytes Dendritic Monocyte Monocyte
## 7 Mast Cell/MEP ?MEP/Mast ?MEP/Mast
## 8 Granulocyte? Prog. ?Prog ?CMP/Neutro
## 9 Monocyte/Macrophage Monocytes Macrophage Macrophage
## 10 B-cells B cells B cell B cell
## 11 Erythrocyte Erythrocyte Erythrocyte Erythrocyte
## 12 T-cells T cells T cell T cell
## 13 Megakaryocyte HSPCs/Ery Megakaryocyte Megakaryocyte
## 14 Lymphocyte/Stromal Cell B cell B cell
## 15 Plasma Cell Plasma B cell B cell
UMAP projections of the data of different subsets of the data with the cell type labels.